package com.xxzuibang.day16.日期类;

import java.sql.Date;
import java.time.Instant;

public class instant_ {
    public static void main(String[] args) {
        Instant now=Instant.now();
        System.out.println(now);
        //通过form可以把instant转换为date
        Date date= (Date) Date.from(now);
        Instant instant=date.toInstant();
        System.out.println(instant);
    }
}
